<!DOCTYPE html>
<html ng-app="testApp">
<head>
<meta charset="UTF-8">
<title>Error Code Checker</title>
<script src="../lib/angular/angular.js"></script>
<script>
var testApp = angular.module("testApp",[]);

testApp.controller('testCtrl', ['$scope', '$http', function($scope, $http){
    
    var test = this;
    test.message = 'Message bind on "controller as"';
    
    test.url = 'http://nkggsportal.eng.citrite.net:1111/api/2/repositories/';
    
    $http.get(test.url).success(function(data, status, headers, config){
        
        console.log("success");
        
    }).error(function(data, status, headers, config){
        console.error("error");
    });
    
}]);

</script>
</head>
<body>
    <p>Test http by angular</p>
    <div ng-controller="testCtrl as test">
        <p>{{test.message}}</p>
        <p>Get data form {{test.url}}</p>
    </div>
<div>
</div>
</body>
</html>